import mug from "@element-plus/icons-vue/dist/es/mug.mjs";

let pfe={
    data() {
        const tableData = [
            {
                date: '上海大区-办公软件产品销售-销售专员',
                name: '32',
                state: '475',
                city: '234',
                address: '245',
                zip: '发布招聘',
            },
            {
                date: '人工智能及算法方向-Java开发工程师',
                name: '32',
                state: '475',
                city: '234',
                address: '245',
                zip: '发布招聘',
            },
            {
                date: '地方机构-项目交付部-实施工程师',
                name: '32',
                state: '475',
                city: '234',
                address: '245',
                zip: '发布招聘',
            },
        ]
        return {
            // 是否折叠
            tableData: tableData,
            isCollapse: false
        }
    },
    created() {
        this.getMenuList()
    },
    methods: {
        logout() {
            window.sessionStorage.clear()
            this.$router.push('/login')
        },
        // 获取所有的菜单数据
        async getMenuList() {
            const {data: res} = await this.$http.get('menus')
            if (res.meta.status !== 200) return this.$message.error(res.meta.msg)
            // 成功了，进行赋值
            this.menulist = res.data
            console.log(res)
        },
        // 点击按钮，切换菜单的折叠与展开
        toggleCollapse() {
            this.isCollapse = !this.isCollapse
        }
    },
}

export {
    pfe
}